package com.huangliusong.desigin.pattern.creational.builder.v2;

/**
 * @author huangliusong
 * @since 2018/10/10
 * {@link }
 */
public class Course {
    private String courseName;
    private String coursePPT;
    private String courseVideo;
    private String courseArticle;


    //question
    private String courseOA;

    @Override
    public String toString() {
        return "Course{" +
                "courseName='" + courseName + '\'' +
                ", coursePPT='" + coursePPT + '\'' +
                ", courseVideo='" + courseVideo + '\'' +
                ", courseArticle='" + courseArticle + '\'' +
                ", courseOA='" + courseOA + '\'' +
                '}';
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCoursePPT() {
        return coursePPT;
    }

    public void setCoursePPT(String coursePPT) {
        this.coursePPT = coursePPT;
    }

    public String getCourseVideo() {
        return courseVideo;
    }

    public void setCourseVideo(String courseVideo) {
        this.courseVideo = courseVideo;
    }

    public String getCourseArticle() {
        return courseArticle;
    }

    public void setCourseArticle(String courseArticle) {
        this.courseArticle = courseArticle;
    }

    public String getCourseOA() {
        return courseOA;
    }

    public void setCourseOA(String courseOA) {
        this.courseOA = courseOA;
    }


    public Course(CourseBuilder courseBuilder) {
        this.courseArticle=courseBuilder.courseArticle;
        this.courseName=courseBuilder.courseName;
        this.courseOA=courseBuilder.courseOA;
        this.coursePPT=courseBuilder.coursePPT;
        this.courseVideo=courseBuilder.courseVideo;
    }

    public static class CourseBuilder{
        private String courseName;
        private String coursePPT;
        private String courseVideo;
        private String courseArticle;


        //question
        private String courseOA;

        public CourseBuilder builderCourseName(String courseName){
            this.courseName=courseName;
            return this;
        }

        public CourseBuilder builderCoursePPT(String coursePPT){
            this.coursePPT=coursePPT;
            return this;
        }

        public CourseBuilder builderVideo(String courseVideo){
            this.courseVideo=courseVideo;
            return this;
        }
        public CourseBuilder builderArticle(String courseArticle){
            this.courseArticle=courseArticle;
            return this;
        }

        public CourseBuilder builderCourseOA(String courseOA){
            this.courseOA=courseOA;
            return this;
        }

        public Course build(){
            return new Course(this);
        }

    }
}
